public class test4 {
    public static void main(String[] args) {
        int []array ={1,1,2,2,4};
        int tmp = 0;
        for (int j : array) {
            tmp = tmp ^ j;
        }
        System.out.println(tmp);
    }
            }
